﻿using System.IO;
namespace SOWY.common
{

    public class GeneralConstant
    {
        #region Common Magic Numbers

        public const int FIRST_ITEM = 0;
        public const int REQUIRED_ARGUMENTS = 1;
        public const int POSITION_TASK = 0;
        public const int POSITION_START_DATE = 1;
        public const int POSITION_END_DATE = 2;
        public const int TO_DO_TASK = 0;
        public const int EMPTY = 0;


        #endregion

        #region Common Error Messages

        public const string ERROR = "Error";
        public const string ERROR_NO_ARGUMENT = "No argument specified";
        public const string ERROR_INVALID_ARGUMENT = "Invalid argument specified";
        public const string ERROR_INVALID_COMMAND = "Invalid command specified";
        public const string ERROR_INVALID_DATE = "Invalid date format";
        public const string ERROR_EMPTY_DISPLAY = "No tasks to display";
        public const string ERROR_EMPTY_UPDATE = "No tasks to update";
        public const string ERROR_EMPTY_DELETE = "No tasks to delete";
        public const string ERROR_EXISTING_ENTRY = "Invalid adding of existing task";
        public const string ERROR_INCORRECT_PARAMETER = "Cannot update tasks, number of parameter dont match";
        public const string ERROR_INVALID_INPUT = "Invalid input";
        public const string ERROR_INVALID_INPUT_RANGE = "Invalid input range";
        #endregion

        #region Common Informative Messages

        public const string INFO_TASK_ADDED = "Task added";
        public const string INFO_TASK_DELETED = "Task deleted";
        public const string INFO_TASK_UPDATED = "Task updated";
        public const string INFO_NO_RESULTS = "No results found";
        public const string INFO_SUCCESS_MESSAGE = "success";
        public const string INFO_DO_NOT_UNDERSTAND = "I do not understand what you are trying to do";
        public const string INFO_UPDATE_INFORMATION = "Please enter the content of task.\nExample:\nPlaying Dota on Monday";
        public const string INFO_HELP = "To add task - add badminton on Monday\nTo delete task - delete badminton on Monday\nTo update task - update badminton to watch movie on Monday\nTo undo the previous action - ctrl + Z or type undo";
        public const string INFO_UNDO = "No action to undo";
        public const string INFO_ACTION_CANCEL = "This action is canceled";
        public const string INFO_NO_INPUT_FOUND = "No input found";
        #endregion

        #region common numbers
        public const int COMMON_NUMBER_OF_DAYS = 7;
        public const int COMMON_NUMBER_OF_MONTHS = 12;
        public const int COMMON_NUMBER_OF_WEEKS_YEAR = 52;
        public const int COMMON_NUMBER_OF_DAYS_YEAR = 365;
        public const int COMMON_NUMBER_OF_WEEKS_MONTH = 4;
        public static readonly string[] COMMON_NUMBER_WITH_AFFIX = {"1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th", "10th",
                                                                       "11th", "12th", "13th", "14th", "15th", "16th", "17th", "18th", "19th", "20th",
                                                                       "21st", "22nd", "23rd", "24th", "25th", "26th", "27th", "28th", "29th", "30th",
                                                                       "31st", "32nd", "33rd", "34th", "35th", "36th", "37th", "38th", "39th", "40th",
                                                                       "41st", "42nd", "43rd", "44th", "45th", "46th", "47th", "48th", "49th", "50th", 
                                                                       "51st", "52nd", "53rd", "54th"};
        #endregion

        #region Task Keys

        public static readonly string[] KEY_POSSIBLE_CREATE = { "add", "append", "create", "schedule" };
        public static readonly string[] KEY_POSSIBLE_DELETE = { "delete", "remove", "cancel", "erase", "discard" };
        public static readonly string[] KEY_POSSIBLE_UPDATE = { "amend", "alter", "modify", "update", "adjust", "change" };
        public static readonly string[] KEY_POSSIBLE_RETRIEVE = { "display", "retrieve", "fetch", "search", "get", "find", "locate", "show" };
        public static readonly string[] KEY_POSSIBLE_MARK = { "mark", "set" };
        public static readonly string[] KEY_POSSIBLE_PREPOSITION_OF_TIME_A = { " in ", " at ", " on ", " before ", " by " };
        public static readonly string[] KEY_POSSIBLE_PREPOSITION_OF_TIME_B = { " between ", " from " };
        public static readonly string[] KEY_POSSIBLE_PREPOSITION_OF_TIME_C = { " after " };
        public static readonly string[] KEY_POSSIBLE_PREPOSITION_OF_TIME_D = { " for " };
        public static readonly string[] KEY_POSSIBLE_PREPOSITION_OF_TIME_E = { " as " };
        public static readonly string[] KEY_POSSIBLE_EXIT = { "exit", "quit" };
        public static readonly string[] KEY_POSSIBLE_UNDO = { "undo", "revert" };
        public static readonly string[] KEY_POSSIBLE_TASK_STATUS = { "done", "undone" };
        public const string KEY_ADD = "add";
        public const string KEY_DELETE = "delete";
        public const string KEY_UPDATE = "update";
        public const string KEY_RETRIEVE = "retrieve";
        public const string KEY_MARK = "mark";
        public const string KEY_FLOATING = "";
        public const string KEY_ERROR = "error";
        public const string KEY_ALL = "all";
        public const string KEY_FIRST = "first";
        public const string KEY_LAST = "last";
        public const string KEY_STARTDATE = "startDate";
        public const string KEY_ENDDATE = "endDate";
        public const string KEY_TASK = "task";
        public const string KEY_STATUS = "status";
        public const string TASK_PENDING = "Pending";
        public const string TASK_START = "Started";
        public const string TASK_COMPLETE = "Completed";
        public const string TASK_OVERDUE = "Overdue";
        public const string TASK_DONE = "done";
        public const string TASK_UNDONE = "undone";

        #endregion

        #region Prepositions Of Time

        public const string KEY_BEFORE = "before";
        public const string KEY_AFTER = "after";
        public const string KEY_BY = "by";
        public const string KEY_DURING = "during";
        public const string KEY_BETWEEN = "between";
        public const string KEY_ON = "on";
        public const string KEY_FOR = "for";

        #endregion

        #region Long Month

        public const string MONTH_LONG_JANUARY = "JANUARY";
        public const string MONTH_LONG_FEBRUARY = "FEBRUARY";
        public const string MONTH_LONG_MARCH = "MARCH";
        public const string MONTH_LONG_APRIL = "APRIL";
        public const string MONTH_LONG_MAY = "MAY";
        public const string MONTH_LONG_JUNE = "JUNE";
        public const string MONTH_LONG_JULY = "JULY";
        public const string MONTH_LONG_AUGUST = "AUGUST";
        public const string MONTH_LONG_SEPTEMBER = "SEPTEMBER";
        public const string MONTH_LONG_OCTOBER = "OCTOBER";
        public const string MONTH_LONG_NOVEMBER = "NOVEMBER";
        public const string MONTH_LONG_DECEMBER = "DECEMBER";
        public static readonly string[] MONTH_LONG_ALL = { "JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER" };

        #endregion

        #region Short Month

        public const string MONTH_SHORT_JANUARY = "JAN";
        public const string MONTH_SHORT_FEBRUARY = "FEB";
        public const string MONTH_SHORT_MARCH = "MAR";
        public const string MONTH_SHORT_APRIL = "APR";
        public const string MONTH_SHORT_MAY = "MAY";
        public const string MONTH_SHORT_JUNE = "JUN";
        public const string MONTH_SHORT_JULY = "JUL";
        public const string MONTH_SHORT_AUGUST = "AUG";
        public const string MONTH_SHORT_SEPTEMBER = "SEP";
        public const string MONTH_SHORT_OCTOBER = "OCT";
        public const string MONTH_SHORT_NOVEMBER = "NOV";
        public const string MONTH_SHORT_DECEMBER = "DEC";

        #endregion

        #region Long Day

        public const string DAY_LONG_MONDAY = "MONDAY";
        public const string DAY_LONG_TUESDAY = "TUESDAY";
        public const string DAY_LONG_WEDNESDAY = "WEDNESDAY";
        public const string DAY_LONG_THURSDAY = "THURSDAY";
        public const string DAY_LONG_FRIDAY = "FRIDAY";
        public const string DAY_LONG_SATURDAY = "SATURDAY";
        public const string DAY_LONG_SUNDAY = "SUNDAY";
        public static readonly string[] DAY_LONG_ALL = { "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY" };

        #endregion

        #region Short Day

        public const string DAY_SHORT_MONDAY = "MON";
        public const string DAY_SHORT_TUESDAY = "TUE";
        public const string DAY_SHORT_WEDNESDAY = "WED";
        public const string DAY_SHORT_THURSDAY = "THUR";
        public const string DAY_SHORT_FRIDAY = "FRI";
        public const string DAY_SHORT_SATURDAY = "SAT";
        public const string DAY_SHORT_SUNDAY = "SUN";

        #endregion

        #region Daytime region

        public const string DAYTIME_DAY = "day";
        public const string DAYTIME_WEEK = "week";
        public const string DAYTIME_MONTH = "month";
        public const string DAYTIME_YEAR = "year";
        public const string DAYTIME_DECADE = "decade";

        public const string DAYTIME_TOMORROW = "tomorrow";
        public const string DAYTIME_NEXT = "next";
        public const string DAYTIME_THIS = "this";

        #endregion

        #region Delimiters

        public const char DELIMITER_SPACE = ' ';
        public const string DELIMITER_AND = " and ";
        public const string DELIMITER_TO = " to ";
        public const string DELIMITED_TILL = " till ";
        public const char DELIMITER_NEXTLINE = '\n';
        public const char DELIMITER_AGENDA = '|';
        public const char DELIMITER_COMMA = ',';


        #endregion

        #region Design
        public const int DESIGN_AGENDA_TOP = 6;
        public const int DESIGN_AGENDA_DATE_LEFT = 6;
        public const int DESIGN_AGENDA_TASK_LEFT = 20;
        public const int DESIGN_AGENDA_TASK_MARGIN = 10;
        public const string DESIGN_AGENDA_TO_DO_STRING = "To Do:";
        public const string DESIGN_AGENDA_FONT_FAMILY = "Maiandra GD";
        public const float DESIGN_AGENDA_DATE_FONT_SIZE = 11.25F;
        public const float DESIGN_AGENDA_TASK_FONT_SIZE = 9.75F;

        public const string DESIGN_INPUT_DIALOG_DELETE_COLOR = "Maiandra GD";

        public const int DESIGN_AGENDA_HISTORY_MAX_COUNT = 5;
        public const string DESIGN_NEW_USER = "Welcome to SOWY!!! Press F1 for help.\n";
        public const string DESIGN_HISTORY_START = "--------------------------------------------------------  History  --------------------------------------------------------\n";
        public const string DESIGN_HISTORY_END = "_______________________________________________________________________________\n";
        #endregion

        #region Database
        public const string DATABASE_FILE = "task.txt";
        public const string DATABASE_CSV_LOG_FILE = "log.csv";
        public const string DATABASE_FOLDER = "C:\\temp\\";
        public const int DATABASE_LOG_COLUMN_INDEX_ACTION = 0;
        public const int DATABASE_LOG_COLUMN_INDEX_START_DATE = 1;
        public const int DATABASE_LOG_COLUMN_INDEX_END_DATE = 2;
        public const int DATABASE_LOG_COLUMN_INDEX_TASK = 3;
        #endregion

        #region others

        public const string NO_COMMAND = "NO COMMAND";

        #endregion
    }
}
